<div class="outer_div">
   <div class="inner_div">
      <div>我是内容</div>
   </div>
</div>
.outer_div {
  position: relative;
  overflow: hidden;
  width: 200px;
  height: 200px;
}
.inner_div {
  position: absolute;
  left: 10px;
  right: -20px;
  top: 0;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: scroll;
}

ok,有了以上的代码就可以轻松的实现效果啦!


Liu_xiaoqing
32 声望2 粉丝